#ifndef _DSWWEBS_H
#define _DSWWEBS_H

#include "base.h"
#include "dswasp.h"

#ifdef __cplusplus
extern  "C" {
#endif

#ifndef WEBS
#define WEBS
#endif

#ifndef UEMF
#define UEMF
#endif

#ifndef OS
#define OS LINUX
#endif

#ifndef LINUX
#define LINUX
#endif

#include	<webs/uemf.h>
#include	<webs/wsIntrn.h>

#ifdef __cplusplus
}
#endif

class CDswwebs
{
public:
	CDswwebs(LPST_ENV_T pEnv);
	virtual ~CDswwebs();
private:
	static void* cbWebThreadFunc(void* pParam){((CDswwebs*)pParam)->WebThreadFunc();return NULL;};
	void WebThreadFunc();

	void InitWebs();
	static int websHomePageHandler(webs_t wp, char_t *urlPrefix, char_t *webDir, int arg, char_t *url, char_t *path, char_t *query);
	void UnInitWebs();
	void RegisterPages();
private:
	LPST_ENV_T m_pEnv;
	pthread_t m_thread_id;
	CDswasp* m_pDswasp;
};

#endif

